ACTOR SSG : BrutalWeapon
{
	Game Doom
	SpawnID 33
	Weapon.Kickback 50
	Weapon.SelectionOrder 400
	Weapon.AmmoGive1 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType1 "AmmoShell"
	Weapon.AmmoType2 "SSGAmmo"
	Weapon.AmmoUse1 0
	Weapon.AmmoUse2 0
	Weapon.PreferredSkin "SSg Marine"
    +WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+FORCEXYBILLBOARD
	Inventory.ForbiddenTo Corvus
	Inventory.PickupMessage "$GOTSHOTGUN2"
	Obituary "$OB_MPSSHOTGUN"
    Inventory.PickupSound "CLIPINSS"
	Scale 0.9
	Tag "Super Shotgun"
	States
	{
		Spawn: 
			SGN2 A -1
			Stop
		
		SelectAnimation:    
		Ready:
		Ready3:
		ReadyLoop:
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" A 1 A_WeaponReady(WRF_ALLOWRELOAD)
			SHTZ A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			SHTZ A 0 A_JumpIfInventory("Taunting",1,"Taunt")
			SHTZ A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			SHTZ A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			SHTZ A 0 A_JumpIfInventory("Reloading",1,"Reload")
			SHTZ A 0 A_JumpIfInventory("Unloading",1,"Unload")
			SHTZ A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")	
			TNT1 A 0 A_SetCrosshair(40)
			Loop		
			
		Deselect:
			SHTZ A 0 A_Takeinventory("Zoomed",1)
			SHTZ A 0 A_ZoomFactor(1.0)
			SHTZ A 0 A_TakeInventory("TossGrenade", 1)
			PSH5 A 0 A_JumpIfInventory("IsPaladin",1,3)
			PSH5 A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHT5 A 0 
			"####" DCBA 1
			TNT1 AAAAAAAAAAAAAAAAAA 0 A_Lower
			TNT1 A 1 A_Lower
			Wait
		Select:
			SHTZ A 0 A_Giveinventory("GoSpecial",1)
			SHTZ A 0 A_Takeinventory("HasBarrel",1) 
			SHTZ A 0 A_TakeInventory("TossGrenade", 1)
			TNT1 A 0 A_Raise
			SHTZ A 0 A_GunFlash
			SHTZ A 0 A_JumpIfInventory("SSGAmmo", 1, 1)
			Goto RaiseReloading
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			Goto ReadyPlaceholder
		
		ReadyPlaceholder:
			SHSS A 0 
			TNT1 A 0 A_PlaySound("CLIPINSS")
			PSH5 A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHM5 A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHT5 A 0
			"####" ABCDEF 1 A_WeaponReady(WRF_NOFIRE)
			Goto Ready
		
		RaiseReloading:
			SHTZ A 0
			SHTZ A 0 A_JumpIfInventory("AmmoShell", 2, 1)
			Goto RaiseNoAmmo
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,"PallyLoad2rounds")
			SHTZ A 0 A_JumpIfInventory("IsSorcerer",1,"SorcyLoad2rounds")
			Goto MarineLoad2rounds
		
		PallyLoad2rounds:
			
			PSHZ MNOO 1
			PSHZ A 0 A_playsound("weapons/sshotl")
			PSHZ P 1 Offset(10,36)
			PSHZ P 1 Offset(20,46)
			PSHZ Q 1 Offset(30,56)
			PSHZ Q 1 Offset(40,66)
			PSHZ R 1 Offset(50,76)
			PSHZ S 1
			PSHZ A 0 A_GiveInventory ("Pumping", 1)
				
			//SHTZ T 1 Offset(30,56)
			//SHTZ U 1 Offset(20,46)
			//SHTZ V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 2)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 2)
				
				//SHTZ WX 1
				//SHTZ YZ 1
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_TakeInventory("SSGAlt",1)
			PSHZ IHGF 1
			PSHY DBA 1
			SHTZ A 0 A_ReFire
			PSHZ A 2
			Goto Ready
	
		SorcyLoad2rounds:
			
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			
			SHTM MNOO 1
			SHTZ A 0 A_playsound("weapons/sshotl")
			SHTM P 1 Offset(10,36)
			SHTM P 1 Offset(20,46)
			SHTM Q 1 Offset(30,56)
			SHTM Q 1 Offset(40,66)
			SHTM R 1 Offset(50,76)
			SHTM S 1
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
				
			SHTM T 1 Offset(30,56)
			SHTM U 1 Offset(20,46)
			SHTM V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 2)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 2)
				
			SHTM WX 1
			SHTM YZ 1
			SHTM A 0 A_GiveInventory ("Pumping", 1)
			SHTM A 0 A_TakeInventory("SSGAlt",1)
			SHM9 DE 1
			SHM9 FG 1
			SHTM A 0 A_ReFire
			SHTM A 2	
			Goto Ready
		
		MarineLoad2rounds:
		
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			
			SHTZ MNOO 1
			SHTZ A 0 A_playsound("weapons/sshotl")
			SHTZ P 1 Offset(10,36)
			SHTZ P 1 Offset(20,46)
			SHTZ Q 1 Offset(30,56)
			SHTZ Q 1 Offset(40,66)
			SHTZ R 1 Offset(50,76)
			SHTZ S 1
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
				
			SHTZ T 1 Offset(30,56)
			SHTZ U 1 Offset(20,46)
			SHTZ V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 2)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 2)
				
			SHTZ WX 1
			SHTZ YZ 1
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_TakeInventory("SSGAlt",1)
			SHO9 DE 1
			SHO9 FG 1
			SHTZ A 0 A_ReFire
			SHTZ A 2
			
			Goto Ready
		
		
		RaiseNoAmmo:
			PSH5 A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHM5 A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHT5 A 0
			"####" ABCD 1
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			Goto Ready

		NoAmmo:
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" A 0 A_ZoomFactor(1.0)
			"####" A 0 A_Takeinventory("Zoomed",1)
			"####" A 0 A_Takeinventory("ADSmode",1)
			//TNT1 A 0 A_PlaySound("weapons/empty", 4)
			NoAmmo2:
			"####" A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
			"####" A 0 A_JumpIfInventory("Taunting",1,"Taunt")
			"####" A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			"####" A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			"####" A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" A 5 A_WeaponReady(WRF_ALLOWRELOAD | WRF_NOFIRE)
			SHTZ A 0 A_JumpIfInventory("Reloading",1,"Reload")
			TNT1 A 0 A_JumpIfInventory("NoAutoReload", 1, "NoAmmo2")
			SHTZ A 0 A_JumpIfInventory("AmmoShell",1,"Reload")
			SHTZ A 0 A_JumpIfInventory("FiredPrimary",1,"NoAmmo2")
			Goto Ready3
		
		 Fire:
			SHTZ A 0 A_TakeInventory("Reloading",1)
			SHTZ A 0 A_JumpIfInventory("SSGAlt",1,"AltFire2")
			SHTZ A 0 A_JumpIfInventory("SSGAmmo", 2, 1)
			Goto NoAmmo
			//SHTZ A 0 A_JumpIfInventory("SSGAmmo", 2, 1)
			//Goto AltFire
			
			SHTZ A 0 A_TakeInventory("SSGAmmo", 2)
			SHTZ A 0 A_ZoomFactor(1.6)
			SHTZ A 0 A_JumpIfInventory("IsPaladin", 1, 3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0 A_JumpIfInventory("PowerStrength", 1, 2)
			SHTZ A 0 A_Recoil(5)
			SHTZ A 0
			SHTZ A 0 A_FireCustomMissile("DistantFireSoundSSG", random(-1,1), 0, 0, -12, 0, random(-1,1))
			SHO9 A 0 A_FireBullets (0,0,1,40,"shotpuff",FBF_NORANDOM,300)
			SHO9 A 0 BRIGHT A_playsound("SSHFIRE", 5)
			TNT1 AAAAAAAAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-10,10), 0, 0, -12, 0, random(-5,5))
			TNT1 AAAAAAAAAAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-19,19), 0, -1, 0, 0, random(-9,9))
			TNT1 AAAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles2", random(-19,19), 0, -1, 0, 0, random(-9,9))
			SHTZ A 0 A_SpawnItemEx("PlayerMuzzle2",30,5,27)
			PSHF A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMF A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHOF A 0
			"####" A 1 BRIGHT
			SHTZ A 0 A_FireBullets (10, 1, 9, 13, "ShotgunPuff", FBF_NORANDOM)
			SHTZ A 0 A_FireBullets (6, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)

			
			SHTZ A 0 A_SetPitch(pitch-20)
			TNT1 AA 0
			SHTZ A 0 A_SetPitch(pitch-12)
			PSHF B 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMF B 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHOF B 0
			"####" B 1 BRIGHT
			SHTZ A 0 A_ZoomFactor(1.00)
			//SHTZ AA 0 A_FireCustomMissile("GunFireSmokE", 0, 0, 2, 0, 0, 0)
			//SHTZ AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, -2, 0, 0, 0)
			SHTZ A 0 A_TakeInventory("SSGAlt",1)
			SHTZ A 0 A_TakeInventory("Reloading",1)
			
			PSHF C 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMF C 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHOF C 0
			"####" CDEFG 1 A_SetPitch(pitch+2)
			
			//SHTZ A 0 A_JumpIfInventory("IsNOTTacticalClass", 1, 15)//Tactical Mode takes more time
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" A 1 A_SetPitch(pitch+0.5)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" A 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" A 1 A_JumpIfInventory("Reloading",1,"Reload")
			"####" A 0 A_JumpIfInventory("Kicking",1,"DoKick")
			"####" A 0 A_JumpIfInventory("Taunting",1,"Taunt")
			"####" A 0 A_JumpIfInventory("Salute1", 1, "Salute")
			"####" A 0 A_JumpIfInventory("Salute2", 1, "Salute")
			"####" A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")	
			"####" A 0 A_JumpIfInventory("IsPaladin",1,3)
			"####" A 0 A_JumpIfInventory("IsSorcerer",1,2)
			"####" A 0
			"####" A 1 A_WeaponReady(WRF_NOFIRE | WRF_NOBOB)
			Goto NoAmmo2
		
		Reload:
			
			SHTZ A 0
			
			SHTZ A 0 A_JumpIfInventory("AmmoShell", 1, 1)//Check if has any ammo left to reload
			Goto Ready
			
			TNT1 A 0 A_SetCrosshair(41)
					
			SHTZ A 0 A_TakeInventory("Reloading",1)
			
			
			SHTZ A 0 A_JumpIfInventory("SSGAlt", 1, "Reload2")//Check if still has a shell on left barrel
			
			SHTZ A 0 A_JumpIfInventory("SSGAmmo", 2, "Ready")//Check if still has a shell on left barrel
			
			SHTZ A 0 A_JumpIfInventory("AmmoShell", 2, 1)//Check if has ammo to reload 2 shells
			Goto Reload2
			
		
			
			
			//Reload 2 barrels
			
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,"PallyEject2rounds")
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,"SorcyEject2rounds")
			Goto MarineEject2rounds
			
		PallyEject2rounds:
			
			PSHY ABD 1
			PSHZ FGHIJ 1
			
			Goto SSGOpened
			
		SorcyEject2rounds:
			
			SHTM B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			SHTM B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			SHTM BC 1
			SHMY FAB 1
			SHMY CDE 1
			SHTM GH 1
			SHTM IJ 1	
			
			Goto SSGOpened
			
		MarineEject2rounds:
			
			SHTZ B 2
			SHTZ C 1
			SHTY AB 1
			SHTY CDE 1
			SHTZ F 1
			SHTZ G 3
			SHTZ FHIJ 1
			
		SSGOpened:
			
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,"PallyCloseSSG")
			SHTZ A 0 A_JumpIfInventory("IsSorcerer",1,"SorcyCloseSSG")
			Goto MarineCloseSSG
			
		PallyCloseSSG:
			
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_JumpIfInventory("HasUnloaded", 1, 3)
			TNT1 AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10, -20)
			PSHZ K 2
			PSHZ L 2
			PSHZ MNOO 1
			PSHZ A 0 A_playsound("weapons/sshotl")
			  PSHZ P 1 Offset(10,36)
			  PSHZ P 1 Offset(20,46)
			  PSHZ Q 1 Offset(30,56)
			  PSHZ Q 1 Offset(40,66)
			  PSHZ R 1 Offset(50,76)
			  PSHZ S 1
			  PSHZ A 0 A_GiveInventory ("Pumping", 1)
				
			//SHTZ T 1 Offset(30,56)
			//SHTZ U 1 Offset(20,46)
			//SHTZ V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 2)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 2)
				
				//SHTZ WX 1
				//SHTZ YZ 1
			  SHTZ A 0 A_GiveInventory ("Pumping", 1)
			  SHTZ A 0 A_TakeInventory("SSGAlt",1)
			  PSHZ IHGF 1
			  PSHY DBA 1
			  SHTZ A 0 A_ReFire
			 PSHZ A 2
			
			Goto SSGClosed
		
		SorcyCloseSSG:
			
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_JumpIfInventory("HasUnloaded", 1, 3)
			TNT1 AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10, -20)
			SHTM K 2
			SHTM L 2
			SHTM MNOO 1
			SHTZ A 0 A_playsound("weapons/sshotl")
			  SHTM P 1 Offset(10,36)
			  SHTM P 1 Offset(20,46)
			  SHTM Q 1 Offset(30,56)
			  SHTM Q 1 Offset(40,66)
			  SHTM R 1 Offset(50,76)
			  SHTM S 1
			  SHTM A 0 A_GiveInventory ("Pumping", 1)
				
			SHTM T 1 Offset(30,56)
			SHTM U 1 Offset(20,46)
			SHTM V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 2)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 2)
				
				SHTM WX 1
				SHTM YZ 1
			  SHTM A 0 A_GiveInventory ("Pumping", 1)
			  SHTM A 0 A_TakeInventory("SSGAlt",1)
				SHM9 DE 1
				SHM9 FG 1
			  SHTM A 0 A_ReFire
			 SHTM A 2
			
			Goto SSGClosed
			
		MarineCloseSSG:
			
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_JumpIfInventory("HasUnloaded", 1, 3)
			TNT1 AA 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10, -20)
			SHTZ K 2
			SHTZ L 2
			SHTZ MMNNNOO 1
			  SHTZ P 1
			  SHTZ P 1 offset(2,34)
			  SHTZ A 0 A_playsound("weapons/sshotl")
			  SHTZ Q 1 offset(0,32)
			  SHTZ R 1 
			  SHTZ S 1
			  SHTZ A 0 A_GiveInventory ("Pumping", 1)
				
			SHTZ T 2
			SHTZ U 1 
			SHTZ V 1
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_TakeInventory("AmmoShell", 2)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 2)
				
				SHTZ WXX 1
				SHTZ A 0 A_PlaySound("weapons/sshotc")
				SHTZ YYYZZ 1
			  SHTZ A 0 A_GiveInventory ("Pumping", 1)
			  SHTZ A 0 A_TakeInventory("SSGAlt",1)
				SHO9 DE 1
				SHO9 FG 1
			  SHTZ A 0 A_ReFire
			 SHTZ A 2
			
		SSGClosed:
			TNT1 A 0
			Goto Ready
			

	AltFire:
			SHTZ A 0 A_TakeInventory("Reloading",1)
			SHTZ A 0 A_JumpIfInventory("SSGAmmo",1,3)
			Goto NoAmmo
			TNT1 AAAAA 0
			SHTZ A 0 A_JumpIfInventory("SSGAlt",1,"AltFire2")


			SHTZ A 0 A_TakeInventory("SSGAmmo",1)
			SHTZ A 0 A_GiveInventory("SSGAlt",1)
			SHTZ A 0 A_ALertMonsters
			//SHTZ AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, 2, 0, 0, 0)
			TNT1 AAAAAAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
			TNT1 AAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles2", random(-12,12), 0, -1, 0, 0, random(-9,9))
			PSHU B 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMU B 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTU B 0
			"####" B 1 BRIGHT A_PlaySound("weapons/sg")
			SHTZ A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
			SHTZ A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
			PSHU B 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMU B 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTU B 0
			"####" B 1 BRIGHT A_FireBullets (5, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)
			
			SHTZ A 0 A_SetPitch(pitch-7)
			SHTZ A 0
			
			TNT1 AAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-5,5), 0, 0, -12, 0, random(-5,5))
			SHTZ A 0 A_SetPitch(-5.0 + pitch)
			PSHF A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMF A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHOF A 0
			"####" EFG 1 A_SetPitch(+1.0 + pitch)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" AA 1
			SHTZ A 0
			Goto Ready

		AltFire2:
			SHTZ A 0 A_TakeInventory("SSGAmmo", 1)
			SHTZ A 0 A_ALertMonsters
			//SHTZ AA 0 A_FireCustomMissile("GunFireSmoke", 0, 0, -2, 0, 0, 0)
			TNT1 AAAAAAAAAAAAAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles", random(-12,12), 0, -1, 0, 0, random(-9,9))
			TNT1 AAAAA 0 BRIGHT A_FireCustomMissile("ShotgunParticles2", random(-12,12), 0, -1, 0, 0, random(-9,9))
			PSHU A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMU A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTU A 0
			"####" A 1 BRIGHT A_PlaySound("weapons/sg")
			SHTZ A 0 A_SpawnItemEx("PlayerMuzzle1",30,5,30)
			SHTZ A 0 A_FireCustomMissile("DistantFireSoundShotgun", random(-1,1), 0, 0, -12, 0, random(-1,1))
			PSHU A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMU A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTU A 0
			"####" A 1 BRIGHT A_FireBullets (5, 3, 9, 13, "ShotgunPuff", FBF_NORANDOM)
			
			
			SHTZ A 0 A_SetPitch(pitch-7)
			SHTZ A 0
			
			TNT1 AAAAA 0 A_FireCustomMissile("DecorativeTracer", random(-5,5), 0, 0, -12, 0, random(-5,5))
			SHTZ A 0 A_SetPitch(-4.0 + pitch)
			PSHF A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHMF A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHOF A 0
			"####" EFG 1 A_SetPitch(+1.0 + pitch)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" AA 1
			
			SHTZ A 0 A_TakeInventory("SSGAlt", 1)
			TNT1 A 0 A_JumpIfInventory("NoAutoReload", 1, "NoAmmo")
			Goto Reload
			TNT1 AA 0
			Goto Ready
			
		Reload2:
		
			TNT1 A 0 A_SetCrosshair(41)
			SHTZ A 0 A_TakeInventory("Reloading",1)
			SHTZ A 0 A_JumpIfInventory("AmmoShell",1,1)
			Goto NoAmmo
			SHTZ A 0 A_TakeInventory("SSGAlt",1)
			
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,"PallyOpenSSG1")
			PSHZ A 0 A_JumpIfInventory("IsSorcerer",1,"SorcyOpenSSG1")
			Goto MarineOpenSSG1
			
		PallyOpenSSG1:
			
			PSHY ABD 1
			PSHZ FGHIJ 1
			
			Goto SSGOpened1
			
		SorcyOpenSSG1:
			
			SHTM B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			SHTM B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			SHTM BC 1
			SHMY FAB 1
			SHMY CDE 1
			SHTM GH 1
			SHTM IJ 1	
			
			Goto SSGOpened1
			
		MarineOpenSSG1:
			
			SHTZ B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			SHTZ B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			SHTZ BC 1
			SHTY FAB 1
			SHTY CDE 1
			SHTZ GH 1
			SHTZ IJ 1
			
		SSGOpened1:
			
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_FireCustomMissile("SSGCaseSpawner",0,0,-10, -20)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			PSHZ A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" K 2
			PSH7 A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHM7 A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHT7 A 0
			"####" L 2
			"####" MNOO 1
			"####" A 0 A_playsound("weapons/sshotl")
			"####" P 1 Offset(10,36)
			"####" P 1 Offset(20,46)
			
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,"PallyCloseSSG1")
			PSHZ A 0 A_JumpIfInventory("IsSorcerer",1,"SorcyCloseSSG1")
			Goto MarineCloseSSG1
			
		PallyCloseSSG1:
			
			  PSHZ Q 1 Offset(30,56)
			  PSHZ Q 1 Offset(40,66)
			  PSHZ R 1 Offset(50,76)
			  PSHZ S 1
			  PSHZ A 0 A_GiveInventory ("Pumping", 1)
				
			//SHTZ T 1 Offset(30,56)
			//SHTZ U 1 Offset(20,46)
			//SHTZ V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 1)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 1)
				
				//SHTZ WX 1
				//SHTZ YZ 1
			  SHTZ A 0 A_GiveInventory ("Pumping", 1)
			  SHTZ A 0 A_TakeInventory("SSGAlt",1)
			  PSHZ IHGF 1
			  PSHY DBA 1
			  SHTZ A 0 A_ReFire
			 PSHZ A 2
			
			Goto SSGClosed
		
		SorcyCloseSSG1:
			
			  SHTM Q 1 Offset(30,56)
			  SHTM Q 1 Offset(40,66)
			  SHTM R 1 Offset(50,76)
			  SHTM S 1
			  SHTM A 0 A_GiveInventory ("Pumping", 1)
				
			SHTM T 1 Offset(30,56)
			SHTM U 1 Offset(20,46)
			SHTM V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_TakeInventory("AmmoShell", 1)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 1)
				
				SHTM WX 1
				SHTZ A 0 A_PlaySound("weapons/sshotc")
				SHTM YZ 1
			  SHTM A 0 A_GiveInventory ("Pumping", 1)
			  SHTM A 0 A_TakeInventory("SSGAlt",1)
				SHM9 DE 1
				SHM9 FG 1
			  SHTZ A 0 A_ReFire
			 SHTM A 2
			
			Goto SSGClosed
			
		MarineCloseSSG1:
			
			  SHTZ Q 1 Offset(30,56)
			  SHTZ Q 1 Offset(40,66)
			  SHTZ R 1 Offset(50,76)
			  SHTZ S 1
			  SHTZ A 0 A_GiveInventory ("Pumping", 1)
				
			SHTZ T 1 Offset(30,56)
			SHTZ U 1 Offset(20,46)
			SHTZ V 1 Offset(1,33)
				
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_PlaySound("weapons/sshotc")
			SHTZ A 0 A_TakeInventory("AmmoShell", 1)
			SHTZ A 0 A_GiveInventory("SSGAmmo", 1)
				
				SHTZ WX 1
				SHTZ YZ 1
			  SHTZ A 0 A_GiveInventory ("Pumping", 1)
			  SHTZ A 0 A_TakeInventory("SSGAlt",1)
				SHO9 DE 1
				SHO9 FG 1
			  SHTZ A 0 A_ReFire
			 SHTZ A 2
			
		SSGClosed:
			
		  Goto Ready

		Spawn:
			SGN2 A -1
			Stop
		
		
			
		
		Unload:
			SHTZ A 0 A_ZoomFactor(1.0)
			SHTZ A 0 A_Takeinventory("Unloading",1)
			SHTZ A 0 A_Takeinventory("ADSmode",1)
			SHTZ A 0 A_Takeinventory("Zoomed",1)
			SHTZ A 0 A_JumpIfInventory("SSGAmmo",1,3)
			Goto Ready
			TNT1 AAA 0
			SHTZ A 0 A_Takeinventory("Zoomed",1)
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			SHTZ A 0 A_Takeinventory("Unloading",1)
			
		RemoveBullets:
			TNT1 AAAA 0
			SHTZ A 0 A_JumpIfInventory("SSGAmmo",1,3)
			Goto FinishUnload
			TNT1 AAAAAA 0
			SHTZ A 0 A_Takeinventory("SSGAmmo",1)
			SHTZ A 0 A_Giveinventory("AmmoShell",1)
			Goto RemoveBullets
		
		UnloadPaladin:
		PSHY ABD 1
			PSHZ FGHIJ 1
			PSHY A 0 A_PlaySound("weapons/sshotc")
			TNT1 A 20
			SHTZ A 0 A_GiveInventory("HasUnloaded", 1)
			SHTZ A 0 A_Takeinventory("Unloading",1)
			
			tnt1 A 0 A_GiveInventory ("Pumping", 1)
			tnt1 A 0 A_PlaySound("weapons/sshotc")

	PSHZ IHGF 1
			SHTZ A 0 A_PlaySound("CLIPINSS")
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			  PSHY DBA 1
			Goto Ready
		
		FInishUnload:
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,"UnloadPaladin")
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" B 2 Offset(20,48) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			"####" B 2 Offset(10,36) //A_FireCustomMissile("SmokeSpawner",0,0,0,5)
			"####" BCDEF 1
			"####" GH 1
			"####" A 0 A_PlaySound("weapons/sshotc")
			"####" IJ 1
			"####" K 2
			TNT1 A 20
			SHTZ A 0 A_GiveInventory("HasUnloaded", 1)
			SHTZ A 0 A_Takeinventory("Unloading",1)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHTM A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHTZ A 0
			"####" U 1 Offset(20,46)
			"####" V 1 Offset(1,33)
			
			"####" A 0 A_GiveInventory ("Pumping", 1)
			"####" A 0 A_PlaySound("weapons/sshotc")
			"####" WX 1
			"####" YZ 1
			SHTZ A 0 A_PlaySound("CLIPINSS")
			SHTZ A 0 A_GiveInventory ("Pumping", 1)
			PSHZ A 0 A_JumpIfInventory("IsPaladin",1,3)
			SHM9 A 0 A_JumpIfInventory("IsSorcerer",1,2)
			SHO9 A 0
			"####" DE 1
			"####" FG 1
			Goto Ready
	}
}
